package com.itfreer.forestry.manage;

import com.itfreer.utils.ResponseEntity;

import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping({ "/userinfos" })
@Api("林长新增")
public class LocusLeaderController {


	@Autowired
	private LocusLeaderRequestService locusLeaderRequestService;


	@PostMapping(value = { "/add" }, produces = { "application/json" })
	@Transactional
	public ResponseEntity<Object> add(@RequestBody Map<?, ?> entity) {
		return locusLeaderRequestService.addUserInfo(entity);

	}

	@PostMapping(value = { "/update" }, produces = { "application/json" })
	@Transactional
	public ResponseEntity<Object> update(@RequestBody Map<?, ?> entity) {
		return locusLeaderRequestService.updateUserInfo(entity);

	}

	@PostMapping(value = { "/delete" }, produces = { "application/json" })
	@Transactional
	public ResponseEntity<Object> delete(@RequestBody Map<?, ?> entity) {
		return locusLeaderRequestService.deleteUserInfo(entity);


	}

}
